﻿using MengLin.OOP.DesignPattern.WMS_LC.Implements;
using MengLin.OOP.DesignPattern.WMS_LC.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.WMS_LC.Implements
{
    /// <summary>
    /// 实现IAlarmListener接口的适配类(注-适配器模式_组合方式：外部统一出口调用如这里的Wakeup)
    /// </summary>
    public class TemperatureSensorAlarmListener : IAlarmListener
    {
        private AbstractTemperatureSensor _iTemperatureSensor;
        public TemperatureSensorAlarmListener(AbstractTemperatureSensor iTemperatureSensor)
        {
            _iTemperatureSensor = iTemperatureSensor;
        }

        /// <summary>
        /// 唤醒
        /// </summary>
        public void Wakeup()
        {
            _iTemperatureSensor.Check();
        }
    }
}
